<?php

use App\Enums\UploadFileType;

return [
    // 文件最大
    'max_size' => 10 * 1024 * 1024,

    'upload_dir' => [
        UploadFileType::FILE->value => 'file',
        UploadFileType::IMAGE->value => 'image',
    ],

    //允许上传的文件
    'allow_ext' => [
        UploadFileType::FILE->value => [
            'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'rar', 'zip', //'7z', 'mp3', 'mp4', 'avi', 'mov', 'wmv', 'flv',
            'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp',
            //'exe', 'dll', 'bat', 'msi', 'iso', 'img', 'jar', 'apk', 'deb', 'rpm', 'bin', 'sh', 'py', 'java', 'c', 'cpp',
            //'h', 'js', 'css', 'html', 'xml', 'json', 'md', 'log', 'sql', 'psd', 'ai', 'eps', 'ps', 'indd', 'sketch',
            //'fig', 'cdr', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf',
            //'eps', 'ps', 'indd', 'sketch', 'fig', 'cdr', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf',
            //'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg', 'dxf', 'dwg',
            //'dxf', 'dwg', 'dxf', 'dwg', 'dxf',
        ],
        UploadFileType::IMAGE->value => [
            'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp','svg'
        ],
    ],

    'allow_mine_type' => [
        //图片
        'jpg'  => 'image/jpeg',     // JPEG 图像
        'jpeg' => 'image/jpeg',     // JPEG 图像（扩展写法）
        'png'  => 'image/png',      // PNG 图像
        'gif'  => 'image/gif',      // GIF 图像
        'bmp'  => 'image/bmp',      // BMP 图像
        'webp' => 'image/webp',     // WebP 图像（现代浏览器支持）
        'svg'  => 'image/svg+xml',  // SVG 矢量图
        'ico'  => 'image/x-icon',   // 网站图标

        //excel
        'xls'  => 'application/vnd.ms-excel',  // Excel 97-2003 格式
        'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',  // Excel 2007+ 格式
        'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',  // 启用宏的 Excel
        'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',  // 二进制 Excel

        //word
        'doc'  => 'application/msword',  // Word 97-2003 格式
        'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',  // Word 2007+ 格式
        'docm' => 'application/vnd.ms-word.document.macroEnabled.12',  // 启用宏的 Word

        //ppt
        'ppt'  => 'application/vnd.ms-powerpoint',  // PowerPoint 97-2003 格式
        'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',  // PowerPoint 2007+ 格式
        'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',  // 启用宏的 PowerPoint
        'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',  // PowerPoint 幻灯片放映

        //pdf
        'pdf' => 'application/pdf',  // 便携式文档格式

        //压缩包
        'zip'  => 'application/zip',           // ZIP 压缩包
        'rar'  => 'application/x-rar-compressed', // RAR 压缩包
        '7z'   => 'application/x-7z-compressed',  // 7-Zip 压缩包
        'gz'   => 'application/gzip',          // Gzip 压缩包
        'bz2'  => 'application/x-bzip2',       // Bzip2 压缩包
        'tar'  => 'application/x-tar',         // TAR 归档
        'xz'   => 'application/x-xz',          // XZ 压缩包
    ],
];
